package cm.NewsServiceImpl;



import cm.NewsDao.NewsDao1;
import cm.NewsService.NewsService1;
import cm.entity.News1;


import java.util.List;

public class NewsServiceImpl1 implements NewsService1 {
    private NewsDao1 newsDao;

    public NewsDao1 getNewsDao() {
        return newsDao;
    }

    public void setNewsDao(NewsDao1 newsDao) {
        this.newsDao = newsDao;
    }

    @Override
    public boolean updateNews(News1 news) {
        return newsDao.update(news);
    }

    @Override
    public boolean addNews(News1 news) {
        return newsDao.add(news);
    }

    @Override
    public boolean deleteNews(int id) {
        return newsDao.delete(id);
    }

    @Override
    public List<News1> getNewsList() {
        return newsDao.getNewsList();
    }
}
